import React,{Component} from 'react';
import {
    View,
    Text,
    TouchableOpacity,
    Image,
    StyleSheet
}from 'react-native';
import NavigationBar from './NavigationBar'
export default class Girl extends Component{
    constructor(props){
        super(props);
        }
    renderButton(image){
        return <TouchableOpacity
            onPress={()=>{
                this.props.navigator.pop();
            }}
        >
        <Image style={{width:24,height:24}} source={image}></Image>   
    </TouchableOpacity>
    }
    render(){
        return (
            <View style={styles.container}>
                <NavigationBar 
                  title={'Girl'} 
                  style={{
                      backgroundColor:'#EE6363'
                  }}
                  leftButton={
                    this.renderButton(require('./res/images/ic_arrow_back_white_36pt.png'))
                  }
                  rightButton={
                    this.renderButton(require('./res/images/ic_star.png'))
                  }
                />
                 <Text style={styles.tips}>i am a Girl</Text>
                 <Text style={styles.tips}>我收到了男孩送的：{this.props.what}</Text>
                 <Text style={styles.tips}
                    onPress={()=>{
                        this.props.onCallBack('一盒巧克力');
                        this.props.navigator.pop();
                    }}>
                      回赠巧克力
                    </Text>
            </View>        
        )
    }
}
const styles=StyleSheet.create({
    container:{
        flex:1,
    },
    tips:{
        fontSize:20,
    }
})